
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */
package com.hlkj.pay.util;

import com.hlkj.pay.enums.CommonEnum;
/**
 * @author monk@techsun.com
 * @date 2023/04/25 11:29
 */
public class TemplateCodeUtils {

    

    /**
     *
     * @param code
     * @param templateType
     * @return
     */
    public static String templateCode(Long code, Integer templateType) {
        String format = String.format("%07d", code + 1);
        CommonEnum.TEMPLATE_TYPE templateTypeEnum = CommonEnum.TEMPLATE_TYPE.from(templateType);
        return templateTypeEnum.getCodeValue() + format;
    }

}
